; REQUIRES: x86-registered-target
; RUN: llvm-profgen --binary=%S/Inputs/symbolize.perfbin --perfscript=%s --output=%t1 --show-disassembly-only -x86-asm-syntax=intel --show-source-locations | FileCheck %s --match-full-lines
; RUN: llvm-profgen --binary=%S/Inputs/symbolize.perfbin --perfscript=%s --output=%t2 --show-disassembly-only -x86-asm-syntax=intel --show-source-locations --show-canonical-fname | FileCheck %s --match-full-lines  --check-prefix=CHECK-CANO

; CHECK: Disassembly of section .text [0x520, 0x62c]:
; CHECK:        <funcA.llvm.1000>:
; CHECK-NEXT:     5e0:	mov	eax, edi                           funcA.llvm.1000:0
; CHECK-NEXT:     5e2:	mov	edx, dword ptr [rip + 2099768]     funcLeaf:2 @ funcA.llvm.1000:1
; CHECK-NEXT:     5e8:	mov	ecx, edx                           fib:2 @ funcLeaf:2 @ funcA.llvm.1000:1
; CHECK-NEXT:     5ea:	add	ecx, 3                             fib:2 @ funcLeaf:2 @ funcA.llvm.1000:1
; CHECK-NEXT:     5ed:	cmp	edx, 3                             fib:2 @ funcLeaf:2 @ funcA.llvm.1000:1
; CHECK-NEXT:     5f0:	cmovl	ecx, edx                         fib:2 @ funcLeaf:2 @ funcA.llvm.1000:1
; CHECK-NEXT:     5f3:	sub	eax, ecx                           funcLeaf:2 @ funcA.llvm.1000:1
; CHECK-NEXT:     5f5:	ret                                    funcA.llvm.1000:2
; CHECK-CANO:        <funcA>:
; CHECK-CANO-NEXT:     5e0:	mov	eax, edi                           funcA:0
; CHECK-CANO-NEXT:     5e2:	mov	edx, dword ptr [rip + 2099768]     funcLeaf:2 @ funcA:1
; CHECK-CANO-NEXT:     5e8:	mov	ecx, edx                           fib:2 @ funcLeaf:2 @ funcA:1
; CHECK-CANO-NEXT:     5ea:	add	ecx, 3                             fib:2 @ funcLeaf:2 @ funcA:1
; CHECK-CANO-NEXT:     5ed:	cmp	edx, 3                             fib:2 @ funcLeaf:2 @ funcA:1
; CHECK-CANO-NEXT:     5f0:	cmovl	ecx, edx                         fib:2 @ funcLeaf:2 @ funcA:1
; CHECK-CANO-NEXT:     5f3:	sub	eax, ecx                           funcLeaf:2 @ funcA:1
; CHECK-CANO-NEXT:     5f5:	ret                                    funcA:2
; CHECK: <funcLeaf>:
; CHECK-NEXT:     600:	mov	eax, edi                           funcLeaf:1
; CHECK-NEXT:     602:	mov	edx, dword ptr [rip + 2099736]     funcLeaf:2
; CHECK-NEXT:     608:	mov	ecx, edx                           fib:2 @ funcLeaf:2
; CHECK-NEXT:     60a:	add	ecx, 3                             fib:2 @ funcLeaf:2
; CHECK-NEXT:     60d:	cmp	edx, 3                             fib:2 @ funcLeaf:2
; CHECK-NEXT:     610:	cmovl	ecx, edx                         fib:2 @ funcLeaf:2
; CHECK-NEXT:     613:	sub	eax, ecx                           funcLeaf:2
; CHECK-NEXT:     615:	ret                                    funcLeaf:3
; CHECK: <fib>:
; CHECK-NEXT:     620:	mov	eax, edi                           fib:2
; CHECK-NEXT:     622:	add	eax, 3                             fib:2
; CHECK-NEXT:     625:	cmp	edi, 3                             fib:2
; CHECK-NEXT:     628:	cmovl	eax, edi                         fib:2
; CHECK-NEXT:     62b:	ret                                    fib:8

; symbolize.perfbin is from the following compile commands:
; clang %S/Inputs/symbolize.ll -shared -fPIC -o %S/Inputs/symbolize.perfbin